package ro.qi.framework.sys.db.util;

/**
 * This class represents a column in a row returned by a
 * SQL query. Use this class to iterate through the column
 * details of each row (returned after executing the SQL
 * query)
 */
public class Column
{

	private String columnName = null;
	private Object value      = null;

	/**
	 * Constructor
	 *
	 * @param String	The Name of the field in the DB
	 * @parma Object	The value of the field
	 */
	public Column(String pColumnName, Object pValue)
	{
		columnName	= pColumnName;
		value		= pValue;
	}

	/**
	 * Returns the Name of the field in the table
	 *
	 * @return String
	 */
	public String getName()
	{
		return columnName;
	}

	/**
	 * Returns The value of the field
	 */
	public Object getValue()
	{
		return value;
	}

	public String toString()
	{
		String _str = "";
		_str += columnName + "\t";
		_str += value;

		return _str;
	}

}

